package com.sinopec.basemodule.base.basekt

import android.view.View
import com.sinopec.basemodule.base.BaseFragment
import com.sinopec.basemodule.base.BasePresenter

/**
 * create by lwj
 * kt 版本的base
 */
abstract class BaseFragmentKt<T : BasePresenter>(
    private val layoutId: Int,
) : BaseFragment<T>() {

    fun View.click(onClick:(View)->Unit){
        //调用拓展activity 的click
        (mContext as? BaseActivityKt)?.apply {
            click(onClick)
        }
    }

    override fun getLayoutId(): Int {
        return layoutId
    }

}